//
//  LSZSearchHistoricalTableViewCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2017/12/15.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "LSZSearchHistoricalTableViewCell.h"

@implementation LSZSearchHistoricalTableViewCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UIImageView * imageView = [[UIImageView alloc]init];
        self.imageView.image = [UIImage imageNamed:@"灰色搜索"];
        [self addSubview:self.imageView];

        self.labelTitle = [[UILabel alloc]init];
        self.labelTitle.textColor = titleColorLSZ;
        [LSZSpecialPackaging setLabel_14_5_Size:self.labelTitle];
        [self addSubview:self.labelTitle];

        self.butDeteting = [[UIButton alloc]init];
        [self addSubview:self.butDeteting];

        self.imageViewDeteting = [[UIImageView alloc]init];
        self.imageViewDeteting.image = [UIImage imageNamed:@"我的_下载_删除"];
        [self.butDeteting addSubview:self.imageViewDeteting];

        if (ScreenWidth == 320) {
            //5
            imageView.frame = CGRectMake(20,(45-24)/2, 24, 24);
            self.labelTitle.frame = CGRectMake(CGRectGetMaxX(imageView.frame)+10, (45-24)/2, ScreenWidth- CGRectGetMaxX(imageView.frame)-60,24);
            self.butDeteting.frame = CGRectMake(ScreenWidth-50, 0, 50, 45);
            self.imageViewDeteting.frame = CGRectMake(18,(45-24)/2, 24, 24);
        }else if(ScreenWidth == 375){
            // 6 7
            imageView.frame = CGRectMake(20,(50-26)/2,26,26);
            self.labelTitle.frame = CGRectMake(CGRectGetMaxX(imageView.frame)+10, (50-26)/2, ScreenWidth- CGRectGetMaxX(imageView.frame)-60, 26);
            self.butDeteting.frame = CGRectMake(ScreenWidth-50, 0, 50, 50);
            self.imageViewDeteting.frame = CGRectMake(11,(50-26)/2, 26, 26);
        }else {
            //plus
            imageView.frame = CGRectMake(20,(58-27)/2,27,27);
            self.labelTitle.frame = CGRectMake(CGRectGetMaxX(imageView.frame)+10, (58-27)/2, ScreenWidth- CGRectGetMaxX(imageView.frame)-60, 27);
            self.butDeteting.frame = CGRectMake(ScreenWidth-50, 0, 50, 58);
            self.imageViewDeteting.frame = CGRectMake(11,(58-27)/2, 27, 27);
        }
    }
    return self;
}

@end
